{% extends "base.html" %}

{% block head %}
<title>注册</title>
{% endblock %}

{% block body %}
<form action="/register" method="post">
    <ul>
        <li>{{ form.username.label() }}:{{ form.username()|safe }}</li>
        {% if form.username.errors: %}
        {% for error in form.username.errors %}
            <li>{{ error }}</li>
        {% endfor %}
        {% endif %}
        <li>{{ form.password.label() }}:{{ form.password()|safe }}</li>
        {% if form.password.errors: %}
        {% for error in form.password.errors %}
            <li>{{ error }}</li>
        {% endfor %}
        {% endif %}
        <li>{{ form.password2.label() }}:{{ form.password2()|safe }}</li>
        {% if form.password2.errors: %}
        {% for error in form.password2.errors %}
            <li>{{ error }}</li>
        {% endfor %}
        {% endif %}
        <li>{{ form.realname.label() }}:{{ form.realname()|safe }}</li>
        {% if form.realname.errors: %}
        {% for error in form.realname.errors %}
            <li>{{ error }}</li>
        {% endfor %}
        {% endif %}

        <li><input type="submit" value="提交"/></li>
    </ul>
    {{ xsrf_form_html()|safe }}
</form>
{% endblock %}
